package print;

import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
/*
PrintWriter
基本使用跟printStream一样
 */
public class PrintWriterDemo1 {
    public static void main(String[] args) throws IOException {
        PrintWriter pw = new PrintWriter(new FileWriter("HDay09\\C.txt"),true);
        //得及时刷出缓冲区,但他有自动刷出的方法，只对println有效
        pw.println("Hello World");
        //pw.close();

    }
}
